package com.hl.service.impl;

import com.hl.domain.PsyAndTestName;
import com.hl.domain.Test1;
import com.hl.mapper.TestMapper;
import com.hl.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TestServiceImpl implements TestService {
    @Autowired
    public TestMapper testMapper;

    @Override
    public List<PsyAndTestName> findAll() {
        return testMapper.findAll();
    }

    @Override
    public List<Test1> findLike(String name) {
        return testMapper.findLike(name);
    }

    @Override
    public int insert(Test1 test) {
        return testMapper.insert(test);
    }

    @Override
    public int del(int id) {
        return testMapper.deleteByPrimaryKey((long) id);
    }

    @Override
    public int update(Test1 test) {
        return testMapper.updateByPrimaryKeySelective(test);
    }
}
